package com.dadaguai.constants;

/**
 * 响应状态码规范
 */
public class ResponseCode {
    /**
     * 请求成功
     */
    public static final Integer SUCCESS = 200;
    /**
     * 默认错误，前端不进行拦截
     */
    public static final Integer DEFAULT_ERROR = -1;
    /**
     * token校验失败
     */
    public static final Integer TOKEN_CHECK_ERROR =401;
    /**
     * 未知异常
     */
    public static final Integer UNKNOWN_ERROR = 9999;

    //用户相关业务异常：10开头
    /**
     * userinfo相关参数异常
     */
    public static final Integer USER_PARAM_ERROR = 10001;
    /**
     * 用户被禁用
     */
    public static final Integer USER_DISABLED = 10002;
    /**
     * 用户相关操作失败
     */
    public static final Integer USER_HANDLE_ERROR = 10003;
    /**
     * 用户未登录
     */
    public static final Integer USER_NOT_LOGIN = 10004;

    // 邮件相关异常：11开头

    /**
     * 邮件发送失败
     */
    public static final Integer EMAIL_SEND_ERROR = 11001;

    // 数据库异常 12开头
    /**
     * 数据查询异常
     */
    public static final Integer DATA_QUERY_ERROR = 12000;
    /**
     * 数据更新异常
     */
    public static final Integer DATA_UPDATE_ERROR = 12001;

        //全局异常 20开头

    /**
     * 请求参数类型异常
     */
    public static final Integer PARAM_TYPE_ERROR = 20000;
    /**
     * 缺少请求参数
     */
    public static final Integer PARAM_MISS_ERROR = 20001;
    /**
     * 参数校验异常
     */
    public static final Integer PARAM_CHECK_ERROR = 20002;
    /**
     * 权限不足
     */
    public static final Integer PERMISSION_ERROR = 200003;


}
